1. Field of the Invention
The present invention relates to a computer program product, system, and method for managing multiple locks for data set members in a data set index.
2. Description of the Related Art
A partitioned data set extended (PDSE) is a data set having an index and zero or more members. When adding new data for a new or existing member, the new data is appended sequentially to the end of the PDSE.
The PDSE index may be implemented in a tree data structure where pages allocated to the PDSE data sets are assigned to implement internal nodes and leaf nodes representing the data set index. Each leaf node links to one or more members and provides information to access the member. Each internal node links to one or more further internal nodes or leaf nodes. When a user seeks to access a member, the member name is presented and the tree is traversed through the one or more internal nodes to the leaf node representing the requested member using the member name as the index key. Member data is only loaded into the memory when accessed.
When a data set is opened, the entire data set index is loaded into the memory by assigning pages to implement all the internal and leaf nodes used to represent the entire data set index. Access to the PDSE data set directory is serialized by a single lock to a root node of the data set index tree data structure providing either exclusive or shared access to the directory. Generally the PDSE directory lock is only held as needed and released upon completion of the input or output operation. In some cases, however, it is possible for a job to require the data set index lock for an inordinate amount of time thus denying access to the data set index by other processes.